In order to determine the current passing through a specific point in an electrical circuit, a shunt-based current measurement circuit is often used. Such a circuit uses a current shunt resistor and an amplifier. As is well known in the art, the voltage drop across a resistor is equal to the current passing through the resistor multiplied times the resistance of the resistor: V=IR. The current shunt resistor's resistance is typically very small and accurately known, and the voltage drop across the resistor can be accurately measured. This allows for a calculation of the current passing through the resistor. An example of a prior art circuit is shown in FIG. 1.
U1 is an amplifier circuit which measures the small voltage across the current shunt resistor Rshunt (V+ and V−), and applies a fixed, known gain. The output of U1 is then passed to a microcontroller 10 for processing, such as by an analog to digital converter. By determining the voltage Vout from U1, the voltage across Rshunt can be determined, which allows the load current across Rshunt to be determined. Such systems are well known in the art.
However, the current and voltage measurements in a circuit are affected by the load connected to the circuit. The voltage across—and therefore the current through—the shunt resistor differs when the load is connected to the circuit as compared to when there is no load connected to the circuit. The “no-load output voltage” or “no-load offset” of the circuit refers to its output voltage when the load current is zero. Measurement errors occur when the offset is not known or changes during operation. FIG. 2 illustrates an example transfer function with the offset taken into account.
As illustrated in FIG. 2, the linear transfer function crosses the voltage access at a non-zero number, which is the no-load offset. The no-load offset should therefore be taken into account when determining the current flowing through the shunt resistor.
This offset may actually drift over time. The no-load offset may be affected by the temperature and/or aging of the components in the circuit. As such, in order to properly calibrate any current determination, the no-load offset should be recalculated from time to time. The easiest way to calculate the no-load offset is to disconnect the load from the rest of the circuit, i.e., to set the load current to zero. Unfortunately, this is difficult, impractical or impossible in many circuits.
It is therefore desirable to provide a system which will allow the no-load offset to be recalculated in without removing the load from a circuit. Preferably such a system would be adaptable to either a high- or a low-side circuit. A “high-side” circuit includes the shunt resistor in series with the positive voltage source and before the load. A “low-side” circuit includes the shunt resistor in series after the load on the negative side of the voltage. Example prior art high- and low-side circuits are shown in FIGS. 3 and 4, respectively.